﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
    class NullPropertyGetter : IPropertyGetter
    {
        private readonly object _instance;
        public NullPropertyGetter(object instance)
        {
            this._instance = instance;
        }
        public NamedArgument[] GetNamedArguments()
        {
            var source = _instance as Model1;
            NamedArgument[] args = new NamedArgument[10];
            args[0] = new NamedArgument(source.Author.GetType(), "Author", source.Author);
            args[1] = new NamedArgument(source.Bestseller.GetType(), "Bestseller", source.Bestseller);
            args[2] = new NamedArgument(source.Price.GetType(), "Price", source.Price);
            args[3] = new NamedArgument(source.Publication.GetType(), "Publication", source.Publication);
            args[4] = new NamedArgument(source.Sales.GetType(), "Sales", source.Sales);
            args[5] = new NamedArgument(source.Sales1.GetType(), "Sales1", source.Sales1);
            args[6] = new NamedArgument(source.Shipping.GetType(), "Shipping", source.Shipping);
            args[7] = new NamedArgument(source.Store.GetType(), "Store", source.Store);
            args[8] = new NamedArgument(source.Title.GetType(), "Title", source.Title);
            args[9] = new NamedArgument(source.Title1.GetType(), "Title1", source.Title1);
            return args;
        }
    }
}
